                    <div id="index_search_block_1">
                        <form id="search_1" method="get" action="<?php echo site_url(); ?>search">
                        <p id="index_search_box_l_1">
                            <select name="maincat" id="maincat" class="styled">
                                    <option value="0" selected="selected">หมวดหมู่หลัก</option>
                                    <?php get_cat_option(); ?>
                                </select>
                        </p>
                        
                        <p id="index_search_box_l_2">
                            <select name="subcat" id="subcat" class="styled">
                                    <option value="0" selected="selected">หมวดหมู่ย่อย</option>
                                </select>
                        </p>
                        
                        <p id="index_search_box_l_3">
                            <p class="scroll_checkboxes">
                                <?php get_geography_checkbox(); ?>
                            </p>
                        </p>
                        
                        <p id="index_search_box_l_4">
                            <select name="province" id="province" class="styled">
                                    <option value="0" selected="selected">จังหวัด</option>
                                    <?php get_province_option(0,0); ?>
                                </select>
                            
                            <input type="image" src="<?php echo base_url(); ?>assets/image/gobt.png" id="search_1_bt" />
                        </p>
                        </form>
                    </div>
                    <div id="index_banner_1">
                        <?php get_banner(1); ?>
                    </div>
                    
                    <div id="index_search_block_2">
                        <form id="search_2" method="get" action="<?php echo site_url(); ?>search">
                        <div id="index_search_block_2_l">
                            <p id="index_search_box_r_1">
                                ค้นหาโดยประเถทสินค้า
                            </p>
                            <p id="index_search_box_r_1_w" class="index_search_box_r_w">
                                <input type="text" name="product_type" value="Enter Keyword" class="input_text" onfocus="if($(this).val()=='Enter Keyword'){$(this).val('');}" onblur="if($(this).val()==''){$(this).val('Enter Keyword');}" />
                            </p>
                            
                            <p id="index_search_box_r_2">
                                ค้นหาโดยยี่ห้อสินค้า
                            </p>
                            <p id="index_search_box_r_2_w" class="index_search_box_r_w">
                                <input type="text" name="product_brand" value="Enter Keyword" class="input_text" onfocus="if($(this).val()=='Enter Keyword'){$(this).val('');}" onblur="if($(this).val()==''){$(this).val('Enter Keyword');}" />
                            </p>
                            
                            <p id="index_search_box_r_3">
                                    ค้นหาโดยชื่อบริษัท
                            </p>
                            <p id="index_search_box_r_3_w" class="index_search_box_r_w">
                                <input type="text" name="company_name" value="Enter Keyword" class="input_text" onfocus="if($(this).val()=='Enter Keyword'){$(this).val('');}" onblur="if($(this).val()==''){$(this).val('Enter Keyword');}" />
                                
                                <input type="image" src="<?php echo base_url(); ?>assets/image/gobt.png" id="search_1_bt" />
                                <div class="clear"></div>
                            </p>
                        </div>
                        
                        <div id="index_search_block_2_r">
                            <div id="index_search_box_r_4_1">
                                <input type="radio" class="styled" name="search_text" checked="checked" value="1" />
                                <p>ปรากฏทุกคำ</p>
                                <!--<div class="clear"></div>-->
                            </div>
                            <div id="index_search_box_r_4_2">
                                <input type="radio" class="styled" name="search_text" value="2" />
                                <p>คำใดคำหนึ่ง</p>
                                <!--<div class="clear"></div>-->
                            </div>
                        </div>
                        </form>
                    </div>
                    <div id="index_banner_2">
                        <?php get_banner(2); ?>
                    </div>
                    <!--<div class="clear"></div>-->
                    
                    <div id="index_company_list">
                        <div id="index_company_list_viewall">
                            <a href="<?php echo site_url(); ?>directory" title="view all">
                                view all
                                <?php echo image_asset('arrow_bottom.png', '', array('alt'=>'view all','class'=>'img_link')); ?>
                            </a>
                        </div>
                        
                        <div id="index_company_list_body_bg">
                            <?php
                                                $site_url = site_url();
                                foreach($company_list as $v){
                                    echo <<<ddd
                                                <div class="sub_group_company_list {$v['class']}">
                                                <div class="company_img">
                                                    <img src="{$site_url}assets/image/company/{$v['id']}/{$v['img']}" alt="{$v['name']}" />
                                                </div>
                                                <div class="company_address">
                                                    <h3>{$v['name']}</h3>
                                                    <p>
                                                        {$v['address']}
                                                        {$v['district']}, {$v['province']}, {$v['postcode']}, {$v['country']}
                                                    </p>
                                                </div>
                                                <div class="company_logo">
                                                    <img src="{$site_url}assets/image/company/{$v['id']}/{$v['logo']}" alt="{$v['name']}" />
                                                    {$v['gold_icon']}
                                                    {$v['agent_icon']}
                                                </div>
                                                <div class="company_url">
                                                    <a href="{$v['website']}" rel="nofollow" target="_blank" title="{$v['name']}">{$v['website_name']}</a><br />
                                                    <a href="mailto:{$v['email']}" rel="nofollow" title="{$v['name']}">{$v['email']}</a><br />
                                                    {$v['tel']}<br />
                                                    {$v['fax']}
                                                </div>
                                                <div class="clear">&nbsp;</div>
                                            </div>
ddd;
                                }
                            ?>
                            </div>
                        
                        <div id="index_company_list_footer">
                            
                        </div>
                        
                    </div>
                    <div id="index_right_banner">
                        <?php get_banner(5); ?>
                    </div>
<script>
$(document).ready(function(){
                        $('#maincat').live('change',function(){
                            var parentID = ($(this).val());
                            if(parentID==0){
                                $('#subcat').html('<option value="0" selected="selected">หมวดหมู่ย่อย</option>');
                            }else{
                                $.get('<?php echo site_url(); ?>home/getSubOption/'+parentID,'',function(data){
                                    $('#subcat').html('<option value="0" selected="selected">หมวดหมู่ย่อย</option>'+data);
                                });
                            }
                        });
                        
                        $('#geography').live('change',function(){
                            var parentID = ($(this).val());
                                $.get('<?php echo site_url(); ?>home/getProvinceOption/'+parentID,'',function(data){
                                    $('#province').html('<option value="0" selected="selected">จังหวัด</option>'+data);
                                });
                        });
                        
                        $('.s_geography').live('change',function(){
                            var parentID = $('.s_geography').serialize();
                            //alert(parentID);
                            $.get('<?php echo site_url(); ?>home/getProvinceOption/?'+parentID,'',function(data){
                                $('#province').html('<option value="0" selected="selected">จังหวัด</option>'+data);
                            });
                        });
});
</script>